package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
public class Employee {
    //在职
    public static final int STATE_NORMAL = 1;
    //离职
    public static final int STATE_QUIT = 0;

    private Long id;
    //员工账号
    private String username;
    //真实姓名
    private String realname;
    //密码
    private String password;
    //电话
    private String tel;
    //邮箱
    private String email;
    //部门
    private Department dept;
    //日期类型
    @DateTimeFormat(pattern ="yyyy-MM-dd" )
    //json格式的日期类型
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    //入职时间
    private Date inputTime;
    //状态
    private int state;
    //超级管理员
    private boolean admin;
    //员工角色多对多关系
    private List<Role> roles = new ArrayList<>();
    //关联家庭
    private Family family;
    //关联工作
    private Work work;
    //关联教育
    private Education education;
    //关联薪水
    private Salary salary;

    private String identifier;

    private Position position;
    //数据词典明细对象,封装查询所需的对象
//   职务
    private SystemDictionaryBill business;
//    聘用类型
    private SystemDictionaryBill engage;
//    学历
    private SystemDictionaryBill educa;
//    政治地位
    private SystemDictionaryBill politicalStatus;
//    婚姻状态
    private SystemDictionaryBill married;
//出生日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date bornDate;
//    入职日期
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date hireDate;
//    年龄
    private Integer age;
    //资历
    private Integer seniority;
    //性别
    private Integer gender;
    //地址
    private String address;
    //考勤
    private Long attendance;
    //身份证号
    private String identityNumber;
    private String imagePath;



}